<!--
	通讯录编辑
-->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>JZ-energy</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="../css/public.css"/>
		<link rel="stylesheet" type="text/css" href="../css/mui.picker.min.css" />
		<link rel="stylesheet" type="text/css" href="../css/icons-extra.css" />
		<style type="text/css">
			.mui-table-view-cell {padding: 15px;}
			.mui-content>.mui-table-view:first-child {margin-top: 0px;}
			.mui-input-group .mui-input-row { height: 50px;}
			.mui-input-row label {padding: 16px 15px;}
			input[type=text] {height: 50px;}
		</style>
	</head>
	<body>
		<!--底部导航栏-->
		<nav class="mui-bar mui-bar-tab bg-FFF">
			<a class="mui-tab-item" href="index.html">
				<span class="mui-icon"><img src="../img/index.png"/></span>
				<span class="mui-tab-label">首页</span>
			</a>
			<a class="mui-tab-item" href="monitor.html">
				<span class="mui-icon"><img src="../img/jiance.png"/></span>
				<span class="mui-tab-label">监测</span>
			</a>
			<a class="mui-tab-item" href="work.html">
				<span class="mui-icon"><img src="../img/gongzuo.png"/></span>
				<span class="mui-tab-label">工作</span>
			</a>
			<a class="mui-tab-item" href="myInfor.html">
				<span class="mui-icon"><img src="../img/wode.png"/></span>
				<span class="mui-tab-label">我的</span>
			</a>
		</nav>
		<!--头部导航栏-->
		<header class="mui-bar mui-bar-nav bg-FFF header-bom">
			<a href="" class="mui-action-back mui-icon-extra mui-icon-extra-arrowleftcricle mui-pull-left col-fonts"></a>
			<h1 class="mui-title col-fonts">通讯录</h1>
		</header>
		<!--电站列表内容-->
		<div class="mui-content bg-F8F">
			<form class="mui-input-group af-he be-he" onsubmit="return false;">
				<input type="hidden" name="id" id="id"/>
				<div class="mui-input-row col-fonts af-he line2 font-15">
					<label for="">姓名</label>
					<input type="text" value="" name="pname" id="pname"  class="font-15 ells" maxlength="20"/>
				</div>
				<div class="mui-input-row col-fonts af-he line2 font-15">
					<label for="">电站名称</label>
					<input type="text" value="" name="psname" id="psname" class="stationName font-15 ells"  readonly="readonly"/>
					<input type="hidden" value="" name="psid"  id="psid" class="stationName font-15 ells"/>
				</div>
				<div class="mui-input-row col-fonts af-he line2 font-15">
					<label for="">公司名称</label>
					<input type="text" value="" name="comname" id="comname" class="font-15 ells" maxlength="100"/>
				</div>
				<div class="mui-input-row col-fonts af-he line2 font-15">
					<label for="">公司主页</label>
					<input type="url" value="" name="homepage" id="homepage" class="font-15 ells" oninput="if(value.length>100){value=value.slice(0,100)}"/>
				</div>
				<div class="mui-input-row col-fonts af-he line2 font-15">
					<label for="">联系电话</label>
					<input type="number" value="" name="phone" id="phone"  class="font-15 ells" oninput="if(value.length>30)value=value.slice(0,30)"/>
				</div>
				<div class="mui-input-row col-fonts af-he line2 font-15">
					<label for="">邮箱</label>
					<input type="email" value="" name="email" id="email" class="font-15 ells" oninput="if(value.length>50)value=value.slice(0,50)"/>
				</div>
				<div class="mui-input-row col-fonts af-he line2 font-15">
					<label for="">QQ</label>
					<input type="number" value="" id="qq" name="qq" class="font-15 ells" oninput="if(value.length>11)value=value.slice(0,11)"/>
				</div>
				<div class="mui-input-row col-fonts af-he line2 font-15">
					<label for="">地址</label>
					<input type="text" value="" id="place" name="place" class="font-15 ells" maxlength="50" maxlength="200"/>
				</div>
				<div class="mui-input-row col-fonts af-he line2 font-15" style="height: auto;">
					<label for="">备注</label>
					<textarea id="remark" name="remark" class="font-15" maxlength="500" rows="3" cols=""></textarea>
				</div>
			</form>
			<div class="mui-content-padded submitBtn">
				<button type="button" class="mui-btn mui-btn-block submit-btn col-FFF font-15" style="display:none;" onclick="savemail()">完成</button>
			</div>
		</div>
	</body>
	<script src="../js/jquery.min.js"></script>
	<script src="../js/mui.min.js"></script>
	<script src="../js/main.js"></script>
	<script src="../js/mui.picker.min.js"></script>
	<script src="../js/mailist/mailistEdit.js"></script>
	<script type="text/javascript">
	initItem();
	mui.init({
		beforeback: function() {
			try{
			var  detailPage = plus.webview.getWebviewById('addressList');
			mui.fire(detailPage,'refresh',param);
			}catch(e){}
		}
	});
	function initItem(){
		$("nav a").removeClass("mui-active");
		$("nav a").find("img").each(function(){
			var newsrc = $(this).attr("src").replace("-hover","");
			$(this).attr("src",newsrc);
		});
		$("nav a").find("img[src*='"+param.sel+"']").attr("src","../img/"+param.sel+"-hover.png");
        $("nav a").find("img[src*='"+param.sel+"']").closest("a").addClass("mui-active");
        findPs();
        //电站选择
        if(usersel=="setuser"){
        	$('.stationName').off("tap");
        	$('.stationName').on('tap', function() {
        		$(this).focus();
    			var picker = new mui.PopPicker();
    			picker.setData(arr);
    			picker.show(function(res) {
    				$('.stationName')[0].value=res[0].text;
    				$('.stationName')[1].value=res[0].value;
    			})
    		});
        }
        
	}
	function findPs(){
		$.proAjax({
			url:"/mobile/selectps",
			dataType:"json",
			success:function(data){
				arr=data;
			}
		});
	}
	</script>
</html>
